package vincent.com.layouttest;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v7.app.ActionBarActivity;
import android.view.View;

import vincent.com.layouttest.view.CircleImage;

/**
 * Created by chenzhengwen on 2015/5/20.
 */
public class RoundShowCircleImageActivity extends ActionBarActivity {
    private CircleImage circleImg;
    private int time = 20;
    private int radius = 1;

    private Handler mHandler = new Handler(){
        @Override
        public void handleMessage(Message msg) {
            switch (msg.what){
                case 1:
                circleImg.setRadius(radius);
                radius += 3;
                mHandler.sendEmptyMessageDelayed(1, time);
                break;
            }
        }
    };

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_round_show_circleimg);

        circleImg = (CircleImage)findViewById(R.id.circle_img);
        circleImg.setRadiusCustom(true);
        mHandler.sendEmptyMessage(1);

        this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
    }
}
